import Vue from 'vue'
import Router from 'vue-router'
import Index from './views/index.vue'
import DiFangZhiList from './views/DiFangZhiList.vue'
import DiFangZhi from './ChildrenRouter/DiFangZhi.vue'
import DiFangZhiNeiRong from './ChildrenRouter/DiFangZhiNeiRong.vue'
import Login from './views/Login.vue'
Vue.use(Router)

export default new Router({

    base: process.env.BASE_URL,
    routes: [{
            path: '/',
            redirect: '/index',

        },

        {
            path: '/index',
            name: 'home',
            component: Index
        },
        {
            path: '/DiFangZhiList',
            name: 'DiFangZhiList',
            component: DiFangZhiList,
            children: [ //这里就是二级路由的配置
                {
                    path: '/',
                    redirect: '/DiFangZhi',

                },
                {
                    path: '/DiFangZhi',
                    name: 'DiFangZhi',
                    component: DiFangZhi
                },
                {
                    path: '/DiFangZhiNeiRong',
                    name: 'DiFangZhiNeiRong',
                    component: DiFangZhiNeiRong
                }
            ]
        },
        {
            path: '/Login',
            name: 'Login',
            component: Login
        },
    ]


})